package com.heima.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.pojos.ApArticle;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
@Repository
public interface ApArticleMapper extends BaseMapper<ApArticle> {
    //查询条件
    //@param loadType 1小于 minBehotTime   2 大于maxBehotTime
    List<ApArticle> loadArticle(@Param("dto") ArticleHomeDto dto, @Param("loadType") Integer loadType);

    List<ApArticle> findArticleListByLast5days(@Param("dayParam") LocalDateTime dayParam);

}